<template>
    <div>
        <div class="slide">
	<ul class="icon">
		<li class="up" title="上一页"></li>
		<li class="qq"></li>
		<li class="tel"></li>
		<li class="wx"></li>
		<li class="down" title="下一页"></li>
	</ul>
	<ul class="info">
		<li class="qq">
			<p>在线沟通，请点我<a href="http://wpa.qq.com/msgrd?v=3&uin=1064620936&site=qq&menu=yes" target="_blank">在线咨询</a></p>
		</li>
		<li class="tel">
			<p>咨询热线：<br>400-010-0000<br>客服qq：<br>1064620936</p>
		</li>
		<li class="wx">
			<div class="img"><img src="../assets/img/auth.png" /></div>
		</li>
	</ul>
</div>
        <div id="btn" class="index_cy"></div>
    </div>
</template>

<script>
    export default {
        name: "Chat",
        created(){
            $(function(){

	$('.slide .icon li').not('.up,.down').mouseenter(function(){
		$('.slide .info').addClass('hover');
		$('.slide .info li').hide();
		$('.slide .info li.'+$(this).attr('class')).show();//.slide .info li.qq
	});
	$('.slide').mouseleave(function(){
		$('.slide .info').removeClass('hover');
	});

	$('#btn').click(function(){
		$('.slide').toggle();
		if($(this).hasClass('index_cy')){
			$(this).removeClass('index_cy');
			$(this).addClass('index_cy2');
		}else{
			$(this).removeClass('index_cy2');
			$(this).addClass('index_cy');
		}

	});

});
        }
    }

</script>


<style scoped type="text/css">
    body{
		position: relative;
		background: #EFF2F4;
		font: normal 13px "宋体" !important;
	}
	body,div,ul,li,p,a,img{
		padding: 0;
		margin: 0;
	}
.slide{
		width: 50px;
		height: 250px;
		position: fixed;
		top: 80%;
		margin-top: -126px;
		background: #01947c;
		right: 0;
		border-radius: 5px 0 0 5px;
		z-index: 999;
	}
	.slide ul{
		list-style: none;
	}
	.slide .icon li{
		width: 49px;
		height: 50px;
		background: url(../assets/img/icon.png) no-repeat;
	}
	.slide .icon .up{
		background-position:-330px -120px ;
	}
	.slide .icon li.qq{
		background-position:-385px -73px ;
	}
	.slide .icon li.tel{
		background-position:-385px -160px ;
	}
	.slide .icon li.wx{
		background-position:-385px -120px ;
	}
	.slide .icon li.down{
		background-position:-330px -160px ;
	}
	.slide .info{
		top: 50%;
		height: 147px;
		position: absolute;
		right: 100%;
		background: #01947c;
		width: 0px;
		overflow: hidden;
		margin-top: -73.5px;
		transition:0.5s;
		border-radius:4px 0 0 4px ;
	}
	.slide .info.hover{
		width: 145px;

	}
	.slide .info li{
		width: 145px;
		color: #CCCCCC;
		text-align: center;
	}
	.slide .info li p{
		font-size: 1.1em;
		line-height: 2em;
		padding: 15px;
		text-align: left;
	}
	.slide .info li.qq p a{
		display: block;
		margin-top: 12px;
		width: 100px;
		height: 32px;
		line-height: 32px;
		color: #00DFB9;
		font-size: 16px;
		text-align: center;
		text-decoration: none;
		border: 1px solid #00DFB9;
		border-radius: 5px;
	}
	.slide .info li.qq p a:hover{
		color: #FFFFFF;
		border: none;
		background: #00E0DB;
	}
	.slide .info li div.img{
		height: 100%;
		background: #DEFFF9;
		margin: 15px;
	}
	.slide .info li div.img img{
		width: 100%;
		height: 100%;
	}
	/*控制菜单的按钮*/
	.index_cy{
		width: 30px;
		height: 30px;
		background: url(../assets/img/index_cy.png);
		position: fixed;
		right: 0;
		top: 50%;
		margin-top: 140px;
		background-position: 62px 0;
		cursor: pointer;
	}
	.index_cy2{
		width: 30px;
		height: 30px;
		background: url(../assets/img/index_cy.png);
		position: fixed;
		right: 0;
		top: 50%;
		margin-top: 140px;
		background-position: 30px 0;
		cursor: pointer;
	}
</style>